<?php  if (!defined('PATH_HD')) exit('No direct script access allowed');
include './index/control/IndexControl.php';
//生成静态类
class HtmlControl extends Control{
	// 生成首页静态
    function index(){
    	//$data= file_get_contetns(__ROOT__);
		//file_put_contents('index.html',$data);
    	ob_star();
    	$control=new IndexControl;
    	$control->index();
    	$htmlData=ob_get_clean();
    	if(file_put_contents("index.html", $htmlData)){
    		$this->success('首页生成成功');
    	}else{
    		$this->error('首页生成失败');
    	}
    }
    
}
?>